<div id="dines">
  共有  <b><%=link_to_remote @dines.size.to_s,:update=>"show_dines",:url=>{:controller=>"whiteboard",:action=>"query_dines"}%></b>  次宴请:<p/><br/>
  <div id="show_dines">
    <%=render :partial=>'dine_list',:locals=>{:dines=>@dines}%>
  </div>
  <br/>
  <div style="float:right">
    <%= will_paginate @dines,
      :inner_window => 1,
      :outer_window => 1,
      :prev_label => '上一页',
      :next_label => '下一页'
    %>
  </div>
  <br/>
  <div style="float:right">
    <a href="#" onclick="Element.toggle('new_dine_form');return false">添加宴请</a>  |
    <%=link_to "返回",event_path(:id=>@event.id)%>
  </div>
  <br />
  <div id="new_dine_form" style='display:none'>
    <%remote_form_for :dine,:url=>{:controller=>'dines',:action=>'create',:event_id=>"#{@event.id}"},:html=>{:id=>'dine_form'} do |f|%>
        <div id="errors" style="display:none">
        </div>
        <br/>
        <div class="fields text_fields">
          <%= f.label :name,"宴请名称" %><%= f.text_field :name %><br clear="all"/>
        </div>
        <div class="fields text_fields">
          <%= f.label :location,'宴请地点' %><%= f.text_field :location %><br clear="all"/>
        </div>
        <div class="fields text_fields">
          <%= f.label :occurs_on,'宴请时间' %><%= f.datetime_select :occurs_on %><br clear="all"/>
        </div>
        <div class="fields select_fields">
          <%= f.label :occurs_on,'责任人' %><%=f.collection_select(:conventioner_id,@event.workers,:id,:name)%><br clear="all"/>
        </div>
        <div class="buttons">
        <div class="lt_button">
          <%= f.submit '保存宴请信息',:class=>'submit'%>
        </div>
      </div>
    <%end%>
  </div>
</div>